<!DOCTYPE html>
<html lang="en">

<head>
  <script src="claygl.js"></script>
</head>

<body>
  <canvas id="main"></canvas>
  <script>
    clay.application.create('#main', {

      width: window.innerWidth,
      height: window.innerHeight,

      init (app) {
        // Create camera
        this._camera = app.createCamera([5, 5, 5], [0, 0, 0]);

        // Create a RED cube
        this._cube = app.createCube({
          color: '#999'
        });

        // Create light
        this._mainLight = app.createDirectionalLight([-1, -1, -1]);
      },
      loop (app) {
        this._cube.rotation.rotateY(app.frameTime / 1000);
      }
    });
  </script>
</body>

</html>